perm filename POVTST.FAI[NEW,LSP] blob sn#464227 filedate 1979-08-01 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	title foo test out pdl ov interrupt situation
C00005 ENDMK
C⊗;
title foo test out pdl ov interrupt situation

ftdebk←←1	;turn on to do uwait/debreak normally
ftuwat←←1	;if off, and ftdebk on, does just debreak w/o uwait
ftnext←←0	;on for nextct

a←1
b←2
c←3
d←4
p←17

start:	reset
	setzm intcnt
	setzm pushct
	setzm nextct
	setzm debcnt
	movei a,inth
	movem a,jobapr↑
	movei a,200000	;pdlov
	intenb a,
loop:	hrroi a,foobaz-1
	aos pushct	;count of pushes
	push a,[0]	;this is a pdlov
pc:
ifn ftnext,<
	aos nextct	;count of times next instr executed
>;ifn ftnext
ifn ftdebk,<
	outstr [asciz /return from pdlov
/]
	jrst 4,start
>;ifn ftdebk
ife ftdebk,<
	jrst loop
>;ife ftdebk

inth:	aos b,intcnt
	move a,pushct
	movem a,foopus
	move a,nextct
	movem a,foonex
	move a,jobcni↑
	caie a,200000
	jrst notpov		;int isn't pdlov
	move a,jobtpc↑
	tlnn a,10000		;usr mod
	jrst exec
	movei c,(a)		;flush bits
	caie c,pc
	jrst badpc		;wrong number in jobtpc
ifn ftdebk,<
ifn ftuwat,<
	uwait
>;ifn ftuwat
	debreak
	aos debcnt
	jrst loop
>;ifn ftdebk
ife ftdebk,<
	dismis
>;ife ftdebk

notpov:	uwait
	debreak
	outstr [asciz /Huh?  I got a non pdl ov interrupt.
/]
	jrst 4,start

exec:	movem a,footpc
	movem b,foocnt
	uwait
	debreak
	outstr [asciz /user bit off, pc in footpc
/]
	jrst 4,start

badpc:	movem a,footpc
	movem b,foocnt
	uwait
	debreak
	outstr [asciz /user bit on but bad jobtpc, in footpc
/]
	jrst 4,start

intcnt:	0
foocnt:	0
pushct:	0
nextct:	0
foopus:	0
foonex:	0
debcnt:	0

footpc:	0
	0
	0
foobaz:	0
	0
	0

	end start